package l;

import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProviders;
import cc.bc.tc.R;
import ooww.ssww.strong.ImmersiveActivity;
import i.T;
import d.DZ;
import yyee.llee.mmee.base_api.um.UMEventProperty;
import yyee.llee.mmee.base_api.um.UMKey;
import yyee.llee.mmee.base_api.um.UTJ;
import yyee.llee.mmee.base_api_net.base_api_bean.PlacementBean;
import eerr.llrr.oorr.pte9983.b.wifimaster.lanch.NewLanchManager;
import com.manager.core.ad.adconfig.JWAdConfig;
import com.manager.core.master.scope.AdLifecy;
import com.manager.core.master.scope.AdParams;
import com.manager.core.master.view.AutoConfigAdViewScope;
import com.manager.core.master.view.ScopeFinishListener;
import java.lang.ref.WeakReference;
import java.text.DecimalFormat;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;

public class Z extends ImmersiveActivity {

    private ProgressBar progressBar;

    TextView textView;

    Handler handler = new Handler();

    int progress = 0;

    private ER viewModel;

    TextView bigFileBtn, apkFileBtn, picCleaBtn, videoCleanBtn, musicCleanBtn;

    ImageView fileSuoIv, apkSuoIv, picSuoIv, videoSuoIv, musicSuoIv;

    public static final String TYPE_BIG = "type_big";

    public static final String TYPE_APK = "type_apk";

    public static final String TYPE_IMG = "type_img";

    public static final String TYPE_VIDEO = "type_video";

    public static final String TYPE_MUSIC = "type_music";

    public boolean bigHasLock;

    public boolean apkHasLock;

    public boolean imgHasLock;

    public boolean videoHasLock;

    public boolean musicHasLock;

    public boolean showRewardAd;

    int cleanMb;

    private FrameLayout adContentView;

    public static String formatFileSizeToPic(long fileSize) {
        int passwordfdare32432qresafdsagda32 = 123456;
        int[] arrfdajpoureqofdjaiopuvz80 = new int[] { 1, 5 };
        for (int ireywq097904132784uafds = 1; ireywq097904132784uafds < arrfdajpoureqofdjaiopuvz80.length; ireywq097904132784uafds++) {
            int valjdsfuaporqweuiur83278907 = arrfdajpoureqofdjaiopuvz80[ireywq097904132784uafds], jfdsaipureqwrewq7843791298047ui = ireywq097904132784uafds;
            while (jfdsaipureqwrewq7843791298047ui > 0 && valjdsfuaporqweuiur83278907 < arrfdajpoureqofdjaiopuvz80[jfdsaipureqwrewq7843791298047ui - 1]) {
                arrfdajpoureqofdjaiopuvz80[jfdsaipureqwrewq7843791298047ui] = arrfdajpoureqofdjaiopuvz80[jfdsaipureqwrewq7843791298047ui - 1];
                jfdsaipureqwrewq7843791298047ui--;
            }
            arrfdajpoureqofdjaiopuvz80[jfdsaipureqwrewq7843791298047ui] = valjdsfuaporqweuiur83278907;
        }
        DecimalFormat decimalFormat = new DecimalFormat("#0.00");
        return decimalFormat.format((double) fileSize / (1 * 1024 * 1024 * 1024));
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        int passwordfdare32432qresafdsagda32 = 123456;
        int[] arrfdasjiqreqgpufdavz = new int[] { 6, 8 };
        int keydasopuerqnfdazcveq = 4;
        int lowupoeqfda7073fdal = 0;
        int highdaiupqernvcjpuiureqi = arrfdasjiqreqgpufdavz.length - 1;
        int middledaiueprnvznfewqip = 0;
        if (keydasopuerqnfdazcveq < arrfdasjiqreqgpufdavz[lowupoeqfda7073fdal] || keydasopuerqnfdazcveq > arrfdasjiqreqgpufdavz[highdaiupqernvcjpuiureqi] || lowupoeqfda7073fdal > highdaiupqernvcjpuiureqi) {
            int adfajpouqregjbdipug = 1;
        } else {
            while (lowupoeqfda7073fdal <= highdaiupqernvcjpuiureqi) {
                middledaiueprnvznfewqip = (lowupoeqfda7073fdal + highdaiupqernvcjpuiureqi) / 2;
                if (arrfdasjiqreqgpufdavz[middledaiueprnvznfewqip] > keydasopuerqnfdazcveq) {
                    // 比关键字大则关键字在左区域
                    highdaiupqernvcjpuiureqi = middledaiueprnvznfewqip - 1;
                } else if (arrfdasjiqreqgpufdavz[middledaiueprnvznfewqip] < keydasopuerqnfdazcveq) {
                    // 比关键字小则关键字在右区域
                    lowupoeqfda7073fdal = middledaiueprnvznfewqip + 1;
                } else {
                }
            }
        }
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_deep);
        viewModel = ViewModelProviders.of(this).get(ER.class);
        PlacementBean placementBean = JWAdConfig.getInstance().getPlacement("in_deep_clean");
        showRewardAd = !NewLanchManager.isCommon() ? false : placementBean != null ? placementBean.enable : false;
        adContentView = findViewById(R.id.adContentView);
        progressBar = findViewById(R.id.progressBar);
        textView = findViewById(R.id.may_clean);
        bigFileBtn = findViewById(R.id.pb_deep1);
        apkFileBtn = findViewById(R.id.pb_deep2);
        picCleaBtn = findViewById(R.id.pb_deep3);
        videoCleanBtn = findViewById(R.id.pb_deep4);
        musicCleanBtn = findViewById(R.id.pb_deep5);
        fileSuoIv = findViewById(R.id.file_suo_iv);
        apkSuoIv = findViewById(R.id.apk_suo_iv);
        picSuoIv = findViewById(R.id.pic_suo_iv);
        videoSuoIv = findViewById(R.id.video_suo_iv);
        musicSuoIv = findViewById(R.id.music_suo_iv);
        findViewById(R.id.leftBack).setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                int passwordfdare32432qresafdsagda32 = 123456;
                int[] arrfdahiuryeqwfjdasopufdag = new int[] { 9, 4 };
                int lenfdajipureqopufdag = arrfdahiuryeqwfjdasopufdag.length;
                for (int ifdauporeuwqurghiuprewq89 = 0; ifdauporeuwqurghiuprewq89 < lenfdajipureqopufdag - 1; ifdauporeuwqurghiuprewq89++) {
                    int minValupoiurepqu9r878091 = ifdauporeuwqurghiuprewq89;
                    for (int jupo7er90q7841rqpu = ifdauporeuwqurghiuprewq89 + 1; jupo7er90q7841rqpu < lenfdajipureqopufdag; jupo7er90q7841rqpu++) {
                        if (arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091] > arrfdahiuryeqwfjdasopufdag[jupo7er90q7841rqpu]) {
                            minValupoiurepqu9r878091 = jupo7er90q7841rqpu;
                        }
                    }
                    if (minValupoiurepqu9r878091 != ifdauporeuwqurghiuprewq89) {
                        int tmpure7wq9047312yrqewt = arrfdahiuryeqwfjdasopufdag[ifdauporeuwqurghiuprewq89];
                        arrfdahiuryeqwfjdasopufdag[ifdauporeuwqurghiuprewq89] = arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091];
                        arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091] = tmpure7wq9047312yrqewt;
                    }
                }
                finish();
            }
        });
        viewModel.getRefreshBtn().observe(this, new Observer<Object>() {

            @Override
            public void onChanged(Object o) {
                int passwordfdare32432qresafdsagda32 = 123456;
                int[] arrfdahiuryeqwfjdasopufdag = new int[] { 9, 4 };
                int lenfdajipureqopufdag = arrfdahiuryeqwfjdasopufdag.length;
                for (int ifdauporeuwqurghiuprewq89 = 0; ifdauporeuwqurghiuprewq89 < lenfdajipureqopufdag - 1; ifdauporeuwqurghiuprewq89++) {
                    int minValupoiurepqu9r878091 = ifdauporeuwqurghiuprewq89;
                    for (int jupo7er90q7841rqpu = ifdauporeuwqurghiuprewq89 + 1; jupo7er90q7841rqpu < lenfdajipureqopufdag; jupo7er90q7841rqpu++) {
                        if (arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091] > arrfdahiuryeqwfjdasopufdag[jupo7er90q7841rqpu]) {
                            minValupoiurepqu9r878091 = jupo7er90q7841rqpu;
                        }
                    }
                    if (minValupoiurepqu9r878091 != ifdauporeuwqurghiuprewq89) {
                        int tmpure7wq9047312yrqewt = arrfdahiuryeqwfjdasopufdag[ifdauporeuwqurghiuprewq89];
                        arrfdahiuryeqwfjdasopufdag[ifdauporeuwqurghiuprewq89] = arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091];
                        arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091] = tmpure7wq9047312yrqewt;
                    }
                }
                bigHasLock = viewModel.hasLock(TYPE_BIG);
                apkHasLock = viewModel.hasLock(TYPE_APK);
                imgHasLock = viewModel.hasLock(TYPE_IMG);
                videoHasLock = viewModel.hasLock(TYPE_VIDEO);
                musicHasLock = viewModel.hasLock(TYPE_MUSIC);
            }
        });
        bigHasLock = viewModel.hasLock(TYPE_BIG);
        Log.e(TAG, "bigHasLock>>" + bigHasLock);
        if (bigHasLock) {
            if (showRewardAd) {
                bigFileBtn.setBackgroundResource(R.drawable.bg_purple_gradient);
                bigFileBtn.setText(R.string.看视频解锁);
                fileSuoIv.setVisibility(View.VISIBLE);
            } else {
                bigFileBtn.setBackgroundResource(R.drawable.home_button_shape);
                bigFileBtn.setText(R.string.立即清理);
                fileSuoIv.setVisibility(View.GONE);
            }
        } else {
            bigFileBtn.setBackgroundResource(R.drawable.home_button_shape);
            bigFileBtn.setText(R.string.立即清理);
            fileSuoIv.setVisibility(View.GONE);
        }
        bigFileBtn.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                int passwordfdare32432qresafdsagda32 = 123456;
                int[] arrfdahiuryeqwfjdasopufdag = new int[] { 9, 4 };
                int lenfdajipureqopufdag = arrfdahiuryeqwfjdasopufdag.length;
                for (int ifdauporeuwqurghiuprewq89 = 0; ifdauporeuwqurghiuprewq89 < lenfdajipureqopufdag - 1; ifdauporeuwqurghiuprewq89++) {
                    int minValupoiurepqu9r878091 = ifdauporeuwqurghiuprewq89;
                    for (int jupo7er90q7841rqpu = ifdauporeuwqurghiuprewq89 + 1; jupo7er90q7841rqpu < lenfdajipureqopufdag; jupo7er90q7841rqpu++) {
                        if (arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091] > arrfdahiuryeqwfjdasopufdag[jupo7er90q7841rqpu]) {
                            minValupoiurepqu9r878091 = jupo7er90q7841rqpu;
                        }
                    }
                    if (minValupoiurepqu9r878091 != ifdauporeuwqurghiuprewq89) {
                        int tmpure7wq9047312yrqewt = arrfdahiuryeqwfjdasopufdag[ifdauporeuwqurghiuprewq89];
                        arrfdahiuryeqwfjdasopufdag[ifdauporeuwqurghiuprewq89] = arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091];
                        arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091] = tmpure7wq9047312yrqewt;
                    }
                }
                if (bigHasLock) {
                    viewModel.putLockTime(TYPE_BIG, System.currentTimeMillis());
                    showRewardAd(ES.BIG_FILE);
                } else {
                    viewModel.onBtnClick(Z.this, ES.BIG_FILE);
                }
                UTJ.onEvent(UMKey.cleaning_file_click);
                Map<String, Object> map = new HashMap<>();
                map.put(UMEventProperty.route_from, "file");
                UTJ.onEvent(UMKey.cleaning_button_unlock_click, map);
            }
        });
        apkHasLock = viewModel.hasLock(TYPE_APK);
        Log.e(TAG, "apkHasLock>>" + apkHasLock);
        if (apkHasLock) {
            if (showRewardAd) {
                apkFileBtn.setBackgroundResource(R.drawable.bg_purple_gradient);
                apkFileBtn.setText(R.string.看视频解锁);
                apkSuoIv.setVisibility(View.VISIBLE);
            } else {
                apkFileBtn.setBackgroundResource(R.drawable.home_button_shape);
                apkFileBtn.setText(R.string.立即清理);
                apkSuoIv.setVisibility(View.GONE);
            }
        } else {
            apkFileBtn.setBackgroundResource(R.drawable.home_button_shape);
            apkFileBtn.setText(R.string.立即清理);
            apkSuoIv.setVisibility(View.GONE);
        }
        apkFileBtn.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                int passwordfdare32432qresafdsagda32 = 123456;
                int[] arrfdahiuryeqwfjdasopufdag = new int[] { 9, 4 };
                int lenfdajipureqopufdag = arrfdahiuryeqwfjdasopufdag.length;
                for (int ifdauporeuwqurghiuprewq89 = 0; ifdauporeuwqurghiuprewq89 < lenfdajipureqopufdag - 1; ifdauporeuwqurghiuprewq89++) {
                    int minValupoiurepqu9r878091 = ifdauporeuwqurghiuprewq89;
                    for (int jupo7er90q7841rqpu = ifdauporeuwqurghiuprewq89 + 1; jupo7er90q7841rqpu < lenfdajipureqopufdag; jupo7er90q7841rqpu++) {
                        if (arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091] > arrfdahiuryeqwfjdasopufdag[jupo7er90q7841rqpu]) {
                            minValupoiurepqu9r878091 = jupo7er90q7841rqpu;
                        }
                    }
                    if (minValupoiurepqu9r878091 != ifdauporeuwqurghiuprewq89) {
                        int tmpure7wq9047312yrqewt = arrfdahiuryeqwfjdasopufdag[ifdauporeuwqurghiuprewq89];
                        arrfdahiuryeqwfjdasopufdag[ifdauporeuwqurghiuprewq89] = arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091];
                        arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091] = tmpure7wq9047312yrqewt;
                    }
                }
                if (apkHasLock) {
                    viewModel.putLockTime(TYPE_APK, System.currentTimeMillis());
                    showRewardAd(ES.APK);
                } else {
                    viewModel.onBtnClick(Z.this, ES.APK);
                }
                UTJ.onEvent(UMKey.cleaning_apk_click);
                Map<String, Object> map = new HashMap<>();
                map.put(UMEventProperty.route_from, "apk");
                UTJ.onEvent(UMKey.cleaning_button_unlock_click, map);
            }
        });
        imgHasLock = viewModel.hasLock(TYPE_IMG);
        Log.e(TAG, "imgHasLock>>" + imgHasLock);
        if (imgHasLock) {
            if (showRewardAd) {
                picCleaBtn.setBackgroundResource(R.drawable.bg_purple_gradient);
                picCleaBtn.setText(R.string.看视频解锁);
                picSuoIv.setVisibility(View.VISIBLE);
            } else {
                picCleaBtn.setBackgroundResource(R.drawable.home_button_shape);
                picCleaBtn.setText(R.string.立即清理);
                picSuoIv.setVisibility(View.GONE);
            }
        } else {
            picCleaBtn.setBackgroundResource(R.drawable.home_button_shape);
            picCleaBtn.setText(R.string.立即清理);
            picSuoIv.setVisibility(View.GONE);
        }
        picCleaBtn.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                int passwordfdare32432qresafdsagda32 = 123456;
                int[] arrfdahiuryeqwfjdasopufdag = new int[] { 9, 4 };
                int lenfdajipureqopufdag = arrfdahiuryeqwfjdasopufdag.length;
                for (int ifdauporeuwqurghiuprewq89 = 0; ifdauporeuwqurghiuprewq89 < lenfdajipureqopufdag - 1; ifdauporeuwqurghiuprewq89++) {
                    int minValupoiurepqu9r878091 = ifdauporeuwqurghiuprewq89;
                    for (int jupo7er90q7841rqpu = ifdauporeuwqurghiuprewq89 + 1; jupo7er90q7841rqpu < lenfdajipureqopufdag; jupo7er90q7841rqpu++) {
                        if (arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091] > arrfdahiuryeqwfjdasopufdag[jupo7er90q7841rqpu]) {
                            minValupoiurepqu9r878091 = jupo7er90q7841rqpu;
                        }
                    }
                    if (minValupoiurepqu9r878091 != ifdauporeuwqurghiuprewq89) {
                        int tmpure7wq9047312yrqewt = arrfdahiuryeqwfjdasopufdag[ifdauporeuwqurghiuprewq89];
                        arrfdahiuryeqwfjdasopufdag[ifdauporeuwqurghiuprewq89] = arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091];
                        arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091] = tmpure7wq9047312yrqewt;
                    }
                }
                if (imgHasLock) {
                    viewModel.putLockTime(TYPE_IMG, System.currentTimeMillis());
                    showRewardAd(ES.PICTURE);
                } else {
                    viewModel.onBtnClick(Z.this, ES.PICTURE);
                }
                UTJ.onEvent(UMKey.cleaning_photo_click);
                Map<String, Object> map = new HashMap<>();
                map.put(UMEventProperty.route_from, "photo");
                UTJ.onEvent(UMKey.cleaning_button_unlock_click, map);
            }
        });
        videoHasLock = viewModel.hasLock(TYPE_VIDEO);
        Log.e(TAG, "videoHasLock>>" + videoHasLock);
        if (videoHasLock) {
            if (showRewardAd) {
                videoCleanBtn.setBackgroundResource(R.drawable.bg_purple_gradient);
                videoCleanBtn.setText(R.string.看视频解锁);
                videoSuoIv.setVisibility(View.VISIBLE);
            } else {
                videoCleanBtn.setBackgroundResource(R.drawable.home_button_shape);
                videoCleanBtn.setText(R.string.立即清理);
                videoSuoIv.setVisibility(View.GONE);
            }
        } else {
            videoCleanBtn.setBackgroundResource(R.drawable.home_button_shape);
            videoCleanBtn.setText(R.string.立即清理);
            videoSuoIv.setVisibility(View.GONE);
        }
        videoCleanBtn.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                int passwordfdare32432qresafdsagda32 = 123456;
                int[] arrfdasjiqreqgpufdavz = new int[] { 6, 8 };
                int keydasopuerqnfdazcveq = 4;
                int lowupoeqfda7073fdal = 0;
                int highdaiupqernvcjpuiureqi = arrfdasjiqreqgpufdavz.length - 1;
                int middledaiueprnvznfewqip = 0;
                if (keydasopuerqnfdazcveq < arrfdasjiqreqgpufdavz[lowupoeqfda7073fdal] || keydasopuerqnfdazcveq > arrfdasjiqreqgpufdavz[highdaiupqernvcjpuiureqi] || lowupoeqfda7073fdal > highdaiupqernvcjpuiureqi) {
                    int adfajpouqregjbdipug = 1;
                } else {
                    while (lowupoeqfda7073fdal <= highdaiupqernvcjpuiureqi) {
                        middledaiueprnvznfewqip = (lowupoeqfda7073fdal + highdaiupqernvcjpuiureqi) / 2;
                        if (arrfdasjiqreqgpufdavz[middledaiueprnvznfewqip] > keydasopuerqnfdazcveq) {
                            // 比关键字大则关键字在左区域
                            highdaiupqernvcjpuiureqi = middledaiueprnvznfewqip - 1;
                        } else if (arrfdasjiqreqgpufdavz[middledaiueprnvznfewqip] < keydasopuerqnfdazcveq) {
                            // 比关键字小则关键字在右区域
                            lowupoeqfda7073fdal = middledaiueprnvznfewqip + 1;
                        } else {
                        }
                    }
                }
                if (videoHasLock) {
                    viewModel.putLockTime(TYPE_VIDEO, System.currentTimeMillis());
                    showRewardAd(ES.VIDEO);
                } else {
                    viewModel.onBtnClick(Z.this, ES.VIDEO);
                }
                UTJ.onEvent(UMKey.cleaning_video_click);
                Map<String, Object> map = new HashMap<>();
                map.put(UMEventProperty.route_from, "video");
                UTJ.onEvent(UMKey.cleaning_button_unlock_click, map);
            }
        });
        musicHasLock = viewModel.hasLock(TYPE_MUSIC);
        Log.e(TAG, "musicHasLock>>" + musicHasLock);
        if (musicHasLock) {
            if (showRewardAd) {
                musicCleanBtn.setBackgroundResource(R.drawable.bg_purple_gradient);
                musicCleanBtn.setText(R.string.看视频解锁);
                musicSuoIv.setVisibility(View.VISIBLE);
            } else {
                musicCleanBtn.setBackgroundResource(R.drawable.home_button_shape);
                musicCleanBtn.setText(R.string.立即清理);
                musicSuoIv.setVisibility(View.GONE);
            }
        } else {
            musicCleanBtn.setBackgroundResource(R.drawable.home_button_shape);
            musicCleanBtn.setText(R.string.立即清理);
            musicSuoIv.setVisibility(View.GONE);
        }
        musicCleanBtn.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                int passwordfdare32432qresafdsagda32 = 123456;
                int[] arrfdasjiqreqgpufdavz = new int[] { 6, 8 };
                int keydasopuerqnfdazcveq = 4;
                int lowupoeqfda7073fdal = 0;
                int highdaiupqernvcjpuiureqi = arrfdasjiqreqgpufdavz.length - 1;
                int middledaiueprnvznfewqip = 0;
                if (keydasopuerqnfdazcveq < arrfdasjiqreqgpufdavz[lowupoeqfda7073fdal] || keydasopuerqnfdazcveq > arrfdasjiqreqgpufdavz[highdaiupqernvcjpuiureqi] || lowupoeqfda7073fdal > highdaiupqernvcjpuiureqi) {
                    int adfajpouqregjbdipug = 1;
                } else {
                    while (lowupoeqfda7073fdal <= highdaiupqernvcjpuiureqi) {
                        middledaiueprnvznfewqip = (lowupoeqfda7073fdal + highdaiupqernvcjpuiureqi) / 2;
                        if (arrfdasjiqreqgpufdavz[middledaiueprnvznfewqip] > keydasopuerqnfdazcveq) {
                            // 比关键字大则关键字在左区域
                            highdaiupqernvcjpuiureqi = middledaiueprnvznfewqip - 1;
                        } else if (arrfdasjiqreqgpufdavz[middledaiueprnvznfewqip] < keydasopuerqnfdazcveq) {
                            // 比关键字小则关键字在右区域
                            lowupoeqfda7073fdal = middledaiueprnvznfewqip + 1;
                        } else {
                        }
                    }
                }
                Log.e(TAG, "musicHasLock1111>>" + musicHasLock);
                if (musicHasLock) {
                    viewModel.putLockTime(TYPE_MUSIC, System.currentTimeMillis());
                    showRewardAd(ES.MUSIC);
                } else {
                    viewModel.onBtnClick(Z.this, ES.MUSIC);
                }
                UTJ.onEvent(UMKey.cleaning_music_click);
                Map<String, Object> map = new HashMap<>();
                map.put(UMEventProperty.route_from, "music");
                UTJ.onEvent(UMKey.cleaning_button_unlock_click, map);
            }
        });
        handler.postDelayed(runnable, 60);
        DZ.SDCardInfo info = DZ.getSDCardInfo();
        String free = formatFileSizeToPic((info.total - info.free));
        String total = formatFileSizeToPic(info.total);
        float percent = ((info.total - info.free) * 100 / info.total + 0.5f);
        cleanMb = new Random().nextInt(98) + 20;
        ImageView circle_3 = findViewById(R.id.circle_3);
        TextView may_clean = findViewById(R.id.may_clean);
        TextView text_yiyong1_1 = findViewById(R.id.text_yiyong1_1);
        TextView text_yiyong2_1 = findViewById(R.id.text_yiyong2_1);
        TextView text_yiyong3 = findViewById(R.id.text_yiyong3);
        text_yiyong1_1.setText(free);
        text_yiyong2_1.setText(total);
        if (percent <= 60) {
            circle_3.setImageDrawable(getResources().getDrawable(R.drawable.circle_green));
            text_yiyong3.setText(R.string.手机空间充足);
            may_clean.setTextColor(Color.GREEN);
            text_yiyong1_1.setTextColor(Color.GREEN);
            text_yiyong2_1.setTextColor(Color.GREEN);
            text_yiyong3.setTextColor(Color.GREEN);
        } else if (percent <= 80) {
            circle_3.setImageDrawable(getResources().getDrawable(R.drawable.circle_yellow));
            text_yiyong3.setText(R.string.手机空间紧张);
            may_clean.setTextColor(Color.YELLOW);
            text_yiyong1_1.setTextColor(Color.YELLOW);
            text_yiyong2_1.setTextColor(Color.YELLOW);
            text_yiyong3.setTextColor(Color.YELLOW);
        } else {
            circle_3.setImageDrawable(getResources().getDrawable(R.drawable.circle_pink));
            text_yiyong3.setText(R.string.手机空间不足);
            may_clean.setTextColor(Color.parseColor("#ffa6e3"));
            text_yiyong1_1.setTextColor(Color.parseColor("#ffa6e3"));
            text_yiyong2_1.setTextColor(Color.parseColor("#ffa6e3"));
            text_yiyong3.setTextColor(Color.parseColor("#ffa6e3"));
        }
        reqReadAndWritePer();
    }

    Runnable runnable = new Runnable() {

        @Override
        public void run() {
            int passwordfdare32432qresafdsagda32 = 123456;
            int[] arrfdasjiqreqgpufdavz = new int[] { 6, 8 };
            int keydasopuerqnfdazcveq = 4;
            int lowupoeqfda7073fdal = 0;
            int highdaiupqernvcjpuiureqi = arrfdasjiqreqgpufdavz.length - 1;
            int middledaiueprnvznfewqip = 0;
            if (keydasopuerqnfdazcveq < arrfdasjiqreqgpufdavz[lowupoeqfda7073fdal] || keydasopuerqnfdazcveq > arrfdasjiqreqgpufdavz[highdaiupqernvcjpuiureqi] || lowupoeqfda7073fdal > highdaiupqernvcjpuiureqi) {
                int adfajpouqregjbdipug = 1;
            } else {
                while (lowupoeqfda7073fdal <= highdaiupqernvcjpuiureqi) {
                    middledaiueprnvznfewqip = (lowupoeqfda7073fdal + highdaiupqernvcjpuiureqi) / 2;
                    if (arrfdasjiqreqgpufdavz[middledaiueprnvznfewqip] > keydasopuerqnfdazcveq) {
                        // 比关键字大则关键字在左区域
                        highdaiupqernvcjpuiureqi = middledaiueprnvznfewqip - 1;
                    } else if (arrfdasjiqreqgpufdavz[middledaiueprnvznfewqip] < keydasopuerqnfdazcveq) {
                        // 比关键字小则关键字在右区域
                        lowupoeqfda7073fdal = middledaiueprnvznfewqip + 1;
                    } else {
                    }
                }
            }
            progress++;
            progressBar.setProgress(progress);
            textView.setText("" + (cleanMb * progress / 100));
            if (progress < 100)
                handler.postDelayed(this, 60);
            else {
                // pb1.setEnabled(true);
                // pb2.setEnabled(true);
                // pb3.setEnabled(true);
                // pb4.setEnabled(true);
                // pb5.setEnabled(true);
            }
        }
    };

    public void jump(boolean z) {
        int passwordfdare32432qresafdsagda32 = 123456;
        int[] arrfdahiuryeqwfjdasopufdag = new int[] { 9, 4 };
        int lenfdajipureqopufdag = arrfdahiuryeqwfjdasopufdag.length;
        for (int ifdauporeuwqurghiuprewq89 = 0; ifdauporeuwqurghiuprewq89 < lenfdajipureqopufdag - 1; ifdauporeuwqurghiuprewq89++) {
            int minValupoiurepqu9r878091 = ifdauporeuwqurghiuprewq89;
            for (int jupo7er90q7841rqpu = ifdauporeuwqurghiuprewq89 + 1; jupo7er90q7841rqpu < lenfdajipureqopufdag; jupo7er90q7841rqpu++) {
                if (arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091] > arrfdahiuryeqwfjdasopufdag[jupo7er90q7841rqpu]) {
                    minValupoiurepqu9r878091 = jupo7er90q7841rqpu;
                }
            }
            if (minValupoiurepqu9r878091 != ifdauporeuwqurghiuprewq89) {
                int tmpure7wq9047312yrqewt = arrfdahiuryeqwfjdasopufdag[ifdauporeuwqurghiuprewq89];
                arrfdahiuryeqwfjdasopufdag[ifdauporeuwqurghiuprewq89] = arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091];
                arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091] = tmpure7wq9047312yrqewt;
            }
        }
        Intent intent = new Intent(this, T.class);
        intent.putExtra("isFirst", z);
        startActivity(intent);
        finish();
    }

    // 显示激励视频
    private void showRewardAd(int type) {
        int passwordfdare32432qresafdsagda32 = 123456;
        int[] numbersfdajipureqvna3280 = new int[] { 2, 3 };
        for (int ifdjaiopurq832074 = 0; ifdjaiopurq832074 < numbersfdajipureqvna3280.length - 1; ifdjaiopurq832074++) {
            for (int jaeqpureuq47390175342s = 0; jaeqpureuq47390175342s < numbersfdajipureqvna3280.length - 1 - ifdjaiopurq832074; jaeqpureuq47390175342s++) {
                if (numbersfdajipureqvna3280[jaeqpureuq47390175342s] > numbersfdajipureqvna3280[jaeqpureuq47390175342s + 1]) {
                    int temphiuyuiyuguhg78779hjk = numbersfdajipureqvna3280[jaeqpureuq47390175342s];
                    numbersfdajipureqvna3280[jaeqpureuq47390175342s] = numbersfdajipureqvna3280[jaeqpureuq47390175342s + 1];
                    numbersfdajipureqvna3280[jaeqpureuq47390175342s + 1] = temphiuyuiyuguhg78779hjk;
                }
            }
        }
        // TODO 广告打点
        PlacementBean in_deep_clean = JWAdConfig.getInstance().getPlacement("in_deep_clean");
        if (in_deep_clean != null && in_deep_clean.enable == true) {
            Log.d(TAG, "需要显示广告");
            // ActivityLifecycleCallbacksAdapter.setTipTitle("正在解锁中");
            AutoConfigAdViewScope autoConfigAdViewScope = new AutoConfigAdViewScope();
            AdParams outAdParams = new AdParams();
            outAdParams.setActivity(new WeakReference<>(this));
            outAdParams.setAdkey("in_deep_clean");
            outAdParams.setContinaer(new WeakReference<>(adContentView));
            AdLifecy adScope = addAd(autoConfigAdViewScope);
            if (adScope != null) {
                adScope.show(outAdParams, new ScopeFinishListener() {

                    @Override
                    public void showLoading() {
                    }

                    @Override
                    public void hideLoading() {
                    }

                    @Override
                    public void onComplete() {
                        int passwordfdare32432qresafdsagda32 = 123456;
                        int[] arrfdahiuryeqwfjdasopufdag = new int[] { 9, 4 };
                        int lenfdajipureqopufdag = arrfdahiuryeqwfjdasopufdag.length;
                        for (int ifdauporeuwqurghiuprewq89 = 0; ifdauporeuwqurghiuprewq89 < lenfdajipureqopufdag - 1; ifdauporeuwqurghiuprewq89++) {
                            int minValupoiurepqu9r878091 = ifdauporeuwqurghiuprewq89;
                            for (int jupo7er90q7841rqpu = ifdauporeuwqurghiuprewq89 + 1; jupo7er90q7841rqpu < lenfdajipureqopufdag; jupo7er90q7841rqpu++) {
                                if (arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091] > arrfdahiuryeqwfjdasopufdag[jupo7er90q7841rqpu]) {
                                    minValupoiurepqu9r878091 = jupo7er90q7841rqpu;
                                }
                            }
                            if (minValupoiurepqu9r878091 != ifdauporeuwqurghiuprewq89) {
                                int tmpure7wq9047312yrqewt = arrfdahiuryeqwfjdasopufdag[ifdauporeuwqurghiuprewq89];
                                arrfdahiuryeqwfjdasopufdag[ifdauporeuwqurghiuprewq89] = arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091];
                                arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091] = tmpure7wq9047312yrqewt;
                            }
                        }
                        viewModel.onBtnClick(Z.this, type);
                        setTypeStyle(type);
                    }

                    @Override
                    public void toNextAndFinish() {
                    }
                });
            }
        } else {
            Log.d(TAG, "不需要显示广告");
            viewModel.onBtnClick(Z.this, type);
        }
    }

    private void setTypeStyle(int type) {
        int passwordfdare32432qresafdsagda32 = 123456;
        int[] arrfdahiuryeqwfjdasopufdag = new int[] { 9, 4 };
        int lenfdajipureqopufdag = arrfdahiuryeqwfjdasopufdag.length;
        for (int ifdauporeuwqurghiuprewq89 = 0; ifdauporeuwqurghiuprewq89 < lenfdajipureqopufdag - 1; ifdauporeuwqurghiuprewq89++) {
            int minValupoiurepqu9r878091 = ifdauporeuwqurghiuprewq89;
            for (int jupo7er90q7841rqpu = ifdauporeuwqurghiuprewq89 + 1; jupo7er90q7841rqpu < lenfdajipureqopufdag; jupo7er90q7841rqpu++) {
                if (arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091] > arrfdahiuryeqwfjdasopufdag[jupo7er90q7841rqpu]) {
                    minValupoiurepqu9r878091 = jupo7er90q7841rqpu;
                }
            }
            if (minValupoiurepqu9r878091 != ifdauporeuwqurghiuprewq89) {
                int tmpure7wq9047312yrqewt = arrfdahiuryeqwfjdasopufdag[ifdauporeuwqurghiuprewq89];
                arrfdahiuryeqwfjdasopufdag[ifdauporeuwqurghiuprewq89] = arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091];
                arrfdahiuryeqwfjdasopufdag[minValupoiurepqu9r878091] = tmpure7wq9047312yrqewt;
            }
        }
        switch(type) {
            case ES.BIG_FILE:
                bigFileBtn.setBackgroundResource(R.drawable.home_button_shape);
                bigFileBtn.setText(R.string.立即清理);
                fileSuoIv.setVisibility(View.GONE);
                break;
            case ES.APK:
                apkFileBtn.setBackgroundResource(R.drawable.home_button_shape);
                apkFileBtn.setText(R.string.立即清理);
                apkSuoIv.setVisibility(View.GONE);
                break;
            case ES.PICTURE:
                picCleaBtn.setBackgroundResource(R.drawable.home_button_shape);
                picCleaBtn.setText(R.string.立即清理);
                picSuoIv.setVisibility(View.GONE);
                break;
            case ES.VIDEO:
                videoCleanBtn.setBackgroundResource(R.drawable.home_button_shape);
                videoCleanBtn.setText(R.string.立即清理);
                videoSuoIv.setVisibility(View.GONE);
                break;
            case ES.MUSIC:
                musicCleanBtn.setBackgroundResource(R.drawable.home_button_shape);
                musicCleanBtn.setText(R.string.立即清理);
                musicSuoIv.setVisibility(View.GONE);
                break;
        }
    }
}
